25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

18 satır
486 B

  1. <template>
  2. <div />
  3. </template>
  4. <script setup>
  5. import { articleUrl, useArticleDetail } from '~/composables/useArticle'
  6. /**
  7. * 旧 sitemap 与历史内链使用 /news/detail/{id}.html。
  8. * 先按文章 id 查询所属栏目,再服务端 301 到唯一的 /info/... 规范地址。
  9. */
  10. const nuxtApp = useNuxtApp()
  11. const { detail } = await useArticleDetail()
  12. await nuxtApp.runWithContext(() =>
  13. navigateTo(articleUrl(detail.value), { redirectCode: 301, replace: true }))
  14. </script>